/**
 * @file cognition_wrapper.cpp
 * @brief 认知相关程序封装,主要用于执行条筒搬运任务
 * @author weeksun
 * @version 1.0
 * @date 2017-10-14
 */

#include "cognition_wrapper.h"



using namespace AgvAssistant;
using namespace prosper_user;
//using namespace turtlebot_user;


CognitionWrapper::CognitionWrapper():
  nh_(),nh_private("~"){

  task_name_ = nh_private.param("task",std::string("bucket_transport"));
  driver_name_ = nh_private.param("robot_platform",std::string("hallbot_evoi"));

  if(driver_name_ == "hallbot_evoi"){


    //driver_ptr_turtlebot = RobotDriverBasePtr(new TurtlebotUser(driver_name_));
    driver_ptr_ = RobotDriverBasePtr(new ProsperUser(driver_name_));

    if(task_name_ == "bucket_transport"){
      bucket_transport_ptr_ = BucketTransportPtr(new BucketTransport(driver_ptr_,task_name_));
    }else{
      ROS_FATAL("任务类型不支持");
    }
  }else{
    ROS_FATAL("机器人平台不支持");
  }


}
